// Dirichlet instantiation of the generalized class: we return ballots with
// weights drawn from the standard exponential distribution (by inverting the
// CDF).

#ifndef _VOTE_BG_DIRICHLET
#define _VOTE_BG_DIRICHLET

#include "ballotgen.h"
#include "impartial_gen.h"
#include <list>

using namespace std;

class dirichlet : public impartial_gen {

	protected:
		double get_sample(rng & random_source) const {
			return(log(1 - random_source.drand())); }

	public:
		string name() const { return("Dirichlet"); }

		dirichlet(bool compress_in) :        
			impartial_gen(compress_in) {}
		dirichlet(bool compress_in, bool do_truncate) :        
			impartial_gen(compress_in, do_truncate) {}

};
#endif
